package com.black.service.config;

import com.alibaba.druid.util.DruidPasswordCallback;
import com.black.utils.encrypt.sm4.SM4Util;

import java.util.Properties;

public class DecryptConfig extends DruidPasswordCallback {
    @Override
    public void setProperties(Properties properties) {
        super.setProperties(properties);
        String password = properties.getProperty("password");
        super.setPassword(SM4Util.decryptData_CBC(password).toCharArray());
    }
}
